package com.leadnews.controller;

import com.leadnews.service.UserService;
import com.leadnews.vo.RegisterVo;
import com.leadnews.vo.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping
@CrossOrigin(origins = "*",maxAge = 3600)
public class RegisterController {
    @Autowired
    UserService userService;
    @PostMapping("/register")
    public ResponseResult register(@RequestBody RegisterVo registerVo){
    return userService.register(registerVo);
    }
}
